<html><!-- Created using the cpp_pretty_printer from the dlib C++ library.  See http://dlib.net for updates. --><head><title>dlib C++ Library - image_feature_sampling_abstract.h</title></head><body bgcolor='white'><pre>
<font color='#009900'>// Copyright (C) 2011  Davis E. King (davis@dlib.net)
</font><font color='#009900'>// License: Boost Software License   See LICENSE.txt for the full license.
</font><font color='#0000FF'>#undef</font> DLIB_IMAGE_FEATURE_SaMPLING_ABSTRACT_Hh_
<font color='#0000FF'>#ifdef</font> DLIB_IMAGE_FEATURE_SaMPLING_ABSTRACT_Hh_

<font color='#0000FF'>#include</font> "<a style='text-decoration:none' href='random_subset_selector_abstract.h.html'>random_subset_selector_abstract.h</a>"

<font color='#0000FF'>namespace</font> dlib
<b>{</b>

<font color='#009900'>// ----------------------------------------------------------------------------------------
</font>
    <font color='#0000FF'>template</font> <font color='#5555FF'>&lt;</font>
        <font color='#0000FF'>typename</font> image_array_type,
        <font color='#0000FF'>typename</font> feature_extractor_type,
        <font color='#0000FF'>typename</font> pyramid_type
        <font color='#5555FF'>&gt;</font>
    random_subset_selector<font color='#5555FF'>&lt;</font><font color='#0000FF'>typename</font> feature_extractor_type::descriptor_type<font color='#5555FF'>&gt;</font> <b><a name='randomly_sample_image_features'></a>randomly_sample_image_features</b> <font face='Lucida Console'>(</font>
        <font color='#0000FF'>const</font> image_array_type<font color='#5555FF'>&amp;</font> images,
        <font color='#0000FF'>const</font> pyramid_type<font color='#5555FF'>&amp;</font> pyr,
        <font color='#0000FF'>const</font> feature_extractor_type<font color='#5555FF'>&amp;</font> fe,
        <font color='#0000FF'><u>unsigned</u></font> <font color='#0000FF'><u>long</u></font> num
    <font face='Lucida Console'>)</font>;
    <font color='#009900'>/*!
        requires
            - pyramid_type == a type compatible with the image pyramid objects defined 
              in dlib/image_transforms/image_pyramid_abstract.h
            - feature_extractor_type == a local image feature extractor type such as the
              dlib::hog_image
            - image_array_type == an implementation of dlib/array/array_kernel_abstract.h
              and it must contain image objects which can be passed to pyr() and fe.load()
              and are swappable by global swap().
        ensures
            - creates an image pyramid for each image in images and performs feature
              extraction on each pyramid level.  Then selects a random subsample of at 
              most num local feature vectors and returns it.
    !*/</font>

<font color='#009900'>// ----------------------------------------------------------------------------------------
</font>
<b>}</b>

<font color='#0000FF'>#endif</font> <font color='#009900'>// DLIB_IMAGE_FEATURE_SaMPLING_ABSTRACT_Hh_
</font>


</pre></body></html>